//A.2 inserted Date type from Chapter 9 with modification by mgm A.2
#ifndef DATE_H_	
#define DATE_H_

// simple Date
class Date 
{
public:
	//enum Month {
	//	jan=1, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec
	//};

	//to throw as exceptions
	class Invalid{};

	//Date(int y, Month m, int d);  // check for valid date and initialize

	// check for valid date and initialize (constructor with parameters)
	Date(int y, int m, int d);

	//default constructor
	Date();

	//non-modifying operators (getter)
	int day() const {return d;}
	//Month month() const {return m;}
	int month() const {return m;}
	int year() const {return y;}

	//default date
	Date& default_date();

	//bool is_date(int y, Date::Month m, int d);

	//check validity of date
	bool is_date(int y, int m, int d);	//mgm (A.2)

	//check leap year
	bool leapyear(int y);
private:
	int y;	// year
	//Month m;
	int m;	//month
	int d;	// day
};
#endif //DATE_H_